Bump cmake version to 3.16
authorFriedemann Kleint <Friedemann.Kleint@qt.io>
Fri, 4 Sep 2020 07:32:01 +0000 (09:32 +0200)
committerDmitry Shachnev <mitya57@debian.org>
Tue, 20 Jan 2026 21:26:54 +0000 (00:26 +0300)
Streamline the features list handling in the module
CMakeLists to use the list functionality introduced in cmake 3.3.

Task-number: PYSIDE-1339
Task-number: PYSIDE-904
Change-Id: I184034cae408c815bd80a09016a21fde2969449e
Reviewed-by: Christian Tismer <tismer@stackless.com>
Gbp-Pq: Name Bump-cmake-version-to-3.16.patch

15 files changed:
CMakeLists.txt
examples/samplebinding/CMakeLists.txt
examples/scriptableapplication/CMakeLists.txt
examples/widgetbinding/CMakeLists.txt
sources/pyside2-tools/CMakeLists.txt
sources/pyside2/CMakeLists.txt
sources/pyside2/PySide2/QtGui/CMakeLists.txt
sources/pyside2/PySide2/QtNetwork/CMakeLists.txt
sources/pyside2/doc/CMakeLists.txt
sources/pyside2/tests/pysidetest/CMakeLists.txt
sources/shiboken2/ApiExtractor/CMakeLists.txt
sources/shiboken2/CMakeLists.txt
sources/shiboken2/doc/CMakeLists.txt
sources/shiboken2/tests/CMakeLists.txt
sources/shiboken2/tests/test_generator/CMakeLists.txt

index 595489dfa180ce74c3f848aeee55c85d9b78378f..3c2ba1d615a463f511757c561d6b0d70c99a7841 100644 (file)
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 3.1)
-cmake_policy(VERSION 3.1)
+cmake_minimum_required(VERSION 3.16)
+cmake_policy(VERSION 3.16)
 
 set(CMAKE_BUILD_TYPE Release CACHE STRING "Build Type")
 
index cb61358bf37ce2c9abfdaf44b0fc2c9fd31bb988..f7651e04f6208e3aed215f286306832fab0b708f 100644 (file)
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 3.1)
-cmake_policy(VERSION 3.1)
+cmake_minimum_required(VERSION 3.16)
+cmake_policy(VERSION 3.16)
 
 # Enable policy to not use RPATH settings for install_name on macOS.
 if(POLICY CMP0068)
index 5277d17d18358f4e6147b9ab6cea082f3c9909d0..7fe3b25ca208a445a6fc86d84a9d51d9f98860a1 100644 (file)
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 3.1)
-cmake_policy(VERSION 3.1)
+cmake_minimum_required(VERSION 3.16)
+cmake_policy(VERSION 3.16)
 
 # Enable policy to run automoc on generated files.
 if(POLICY CMP0071)
index a557f90eccbd4692daf5a9319d2db260196d0d56..2966e63b299ccaf34842e155851fa5fa63f1ae3a 100644 (file)
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 3.1)
-cmake_policy(VERSION 3.1)
+cmake_minimum_required(VERSION 3.16)
+cmake_policy(VERSION 3.16)
 
 # Enable policy to not use RPATH settings for install_name on macOS.
 if(POLICY CMP0068)
index ce65750c5b23d68f7b4448bac7260811e4d7e3f7..1492cdf587fb5310f3e20f71cf489f3790820b1e 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.16)
 project(pyside2-tools)
 
 # Don't display "up-to-date / install" messages when installing, to reduce visual clutter.
index 4336d6cc45db012d564378366b6a3805e2b3d785..a9440178244952a142e92d0e2c260ae82f0ee82b 100644 (file)
@@ -1,7 +1,7 @@
 include(cmake/Macros/icecc.cmake) # this must be the first line!
 
-cmake_minimum_required(VERSION 3.1)
-cmake_policy(VERSION 3.1)
+cmake_minimum_required(VERSION 3.16)
+cmake_policy(VERSION 3.16)
 
 # Don't ignore targets that do not exist, inside add_dependencies calls.
 cmake_policy(SET CMP0046 NEW)
index 38a0c1a50585cfbb1bed916b8344cdc59d459087..438250cad1bb9dce5f01b3e532fc73457e9f336e 100644 (file)
@@ -224,9 +224,7 @@ if (Qt${QT_MAJOR_VERSION}Gui_VERSION VERSION_EQUAL 5.14.0
 endif()
 
 # cf qtbase/src/gui/opengl/opengl.pri
-list(FIND QtGui_enabled_features "opengles2" _opengles2Index)
-# ### fixme: For cmake >= 3.3: if(opengles2 IN_LIST QtGui_enabled_features)
-if(_opengles2Index GREATER -1)
+if("opengles2" IN_LIST QtGui_enabled_features)
     list(APPEND QtGui_DROPPED_ENTRIES QOpenGLTimeMonitor QOpenGLTimerQuery QOpenGLVersionFunctionsFactory)
     message(STATUS "Qt${QT_MAJOR_VERSION}Gui: Dropping Desktop OpenGL classes (GLES2)")
 else()
index 9557c4a26d8c36ce9cc94d4bb2e000bfc74d858b..7d45288464c9112dc385b15ecb241566f44dd0a9 100644 (file)
@@ -47,17 +47,10 @@ ${QtNetwork_GEN_DIR}/qudpsocket_wrapper.cpp
 ${QtNetwork_GEN_DIR}/qtnetwork_module_wrapper.cpp
 )
 
-get_property(QtNetwork_enabled_features  TARGET Qt${QT_MAJOR_VERSION}::Network
-             PROPERTY QT_ENABLED_PUBLIC_FEATURES)
 get_property(QtNetwork_disabled_features TARGET Qt${QT_MAJOR_VERSION}::Network
              PROPERTY QT_DISABLED_PUBLIC_FEATURES)
 
-# ### fixme: For cmake >= 3.3, use if( needle IN_LIST list)
-list(FIND QtNetwork_enabled_features  "ssl"  _sslEnabledIndex)
-list(FIND QtNetwork_disabled_features "dtls" _dtlsDisabledIndex)
-list(FIND QtNetwork_disabled_features "sctp" _sctpDisabledIndex)
-
-if(_sslEnabledIndex EQUAL -1)
+if("ssl" IN_LIST QtNetwork_disabled_features)
     list(APPEND QtNetwork_DROPPED_ENTRIES QOcspResponse QSslCipher
          QSslConfiguration QSslDiffieHellmanParameters QSslError
          QSslKey QSslPreSharedKeyAuthenticator QSslSocket)
@@ -72,16 +65,12 @@ else()
          ${QtNetwork_GEN_DIR}/qsslerror_wrapper.cpp
          ${QtNetwork_GEN_DIR}/qsslkey_wrapper.cpp
          ${QtNetwork_GEN_DIR}/qsslpresharedkeyauthenticator_wrapper.cpp
-         ${QtNetwork_GEN_DIR}/qsslsocket_wrapper.cpp)
-     if (Qt${QT_MAJOR_VERSION}Network_VERSION VERSION_EQUAL 5.13.0
-         OR Qt${QT_MAJOR_VERSION}Network_VERSION VERSION_GREATER 5.13.0)
-         list(APPEND QtNetwork_SRC
-              ${QtNetwork_GEN_DIR}/qocspresponse_wrapper.cpp)
-     endif()
+         ${QtNetwork_GEN_DIR}/qsslsocket_wrapper.cpp
+         ${QtNetwork_GEN_DIR}/qocspresponse_wrapper.cpp)
     message(STATUS "Qt${QT_MAJOR_VERSION}Network: Adding SSL classes")
 endif()
 
-if(_dtlsDisabledIndex GREATER -1)
+if("dtls" IN_LIST QtNetwork_disabled_features)
     list(APPEND QtNetwork_DROPPED_ENTRIES QDtls)
     message(STATUS "Qt${QT_MAJOR_VERSION}Network: Dropping DTLS classes")
 else()
@@ -90,7 +79,7 @@ else()
     message(STATUS "Qt${QT_MAJOR_VERSION}Network: Adding DTLS classes")
 endif()
 
-if(_sctpDisabledIndex GREATER -1)
+if("sctp" IN_LIST QtNetwork_disabled_features)
     list(APPEND QtNetwork_DROPPED_ENTRIES QSctpServer QSctpSocket)
     message(STATUS "Qt${QT_MAJOR_VERSION}Network: Dropping SCTP classes")
 else()
index 950e48686ff91991903217ae55837767cfa39f7f..77747a4cb56acb7bc44834518a33d6b3ecd4bcca 100644 (file)
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 3.1)
-cmake_policy(VERSION 3.1)
+cmake_minimum_required(VERSION 3.16)
+cmake_policy(VERSION 3.16)
 
 project(doc)
 
index 0dbd2b7cf3bc9e3bd14a8cce2aa09e29b8fdf6b8..71d92f1bc0c0b6f8e569e91e7118f512b05bef9c 100644 (file)
@@ -1,7 +1,7 @@
 project(pysidetest)
 project(testbinding)
 
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.16)
 
 set(QT_USE_QTCORE 1)
 # no more supported: include(${QT_USE_FILE})
index b081beda9d9507a09aa823344198ad0ba23a2dbd..1a8b66c511d971b1d03887323e4a5993c1c9fe34 100644 (file)
@@ -1,7 +1,7 @@
 project(apiextractor)
 
-cmake_minimum_required(VERSION 3.1)
-cmake_policy(VERSION 3.1)
+cmake_minimum_required(VERSION 3.16)
+cmake_policy(VERSION 3.16)
 
 set(CMAKE_AUTOMOC ON)
 
index c6546021cc117a4465e54e573af67561ca32fa34..e9f37cf5332ac2f3df6248d504bf2c10de8654b8 100644 (file)
@@ -1,7 +1,7 @@
 Include(icecc.cmake)
 
-cmake_minimum_required(VERSION 3.1)
-cmake_policy(VERSION 3.1)
+cmake_minimum_required(VERSION 3.16)
+cmake_policy(VERSION 3.16)
 
 set(CMAKE_BUILD_TYPE Release CACHE STRING "Build Type")
 
index ae4858f959f4aaad0cfe4da547eb04b8785a68fc..5f59bfbf0d440bd15ca5c87eaf486d87521e9f19 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.16)
 
 if(FULLDOCSBUILD EQUAL 0)
     project(shiboken2_doc)
index 2ba951de1f92e63dc53c7fe6bfdda010c90bdbd3..fcd3f43bd2ac868889a705ab9acb7282b4784bd7 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.16)
 
 if(BUILD_TESTS)
     find_package(Qt${QT_MAJOR_VERSION}Test 5.12 REQUIRED)
index 07611e32cba5d51e290ea918ffb9cbdeb011bdb2..b48ae37da00d11d71ac1236a7c71b7bef1ef789a 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.16)
 project(test_generator)
 
 set(dummy_generator_SRC dummygenerator.cpp)